{% if paginator.show_paginator %}
    <div class="paginator">
        {% if paginator.has_prev %}
            <a class="prenext" href="?page={{ paginator.prev_page }}">&laquo; 上一页</a>
        {% else %}
            <a class="prenext" href="">&laquo; 上一页</a>
        {% endif %}

        {% if paginator.has_prev %}
            {% if paginator.dbprev_page %}
            ...
            <a href="?page={{ paginator.dbprev_page }}">{{ paginator.dbprev_page }}</a>
            {% endif %}
            <a href="?page={{ paginator.prev_page }}">{{ paginator.prev_page }}</a>
        {% endif %}
            <a href="?page={{ paginator.curr_page }}">{{ paginator.curr_page }}</a>
        {% if has_next %}
            <a href="?page={{ paginator.next_page }}">{{ paginator.next_page }}</a>
            {% if dbnext_page < pages %}
            <a href="?page={{ paginator.dbnext_page }}">{{ paginator.dbnext_page }}</a>
            ...
            {% endif %}
        {% endif %}

    

        {% if paginator.has_next %}
            <a class="prenext" href="?page={{ paginator.next_page }}">下一页 &raquo;</a>
        {% else %}
            <a class="prenext" href="">下一页 &raquo;</a>
        {% endif %}
        <span class="pagemeg">当前  {{ paginator.curr_page }} of {{ paginator.pages }}</span>
    </div>
{% endif %} 